package com.ruoyi.interfaceConfig.businessObject.mapper;

import com.ruoyi.interfaceConfig.businessObject.domain.BusinessFieldSetting;
import com.ruoyi.interfaceConfig.businessObject.domain.BusinessObjectConfig;
import com.ruoyi.interfaceConfig.businessObject.domain.vo.FieldSettingVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 业务对象配置Mapper接口
 * 
 * @author YiYuan
 * @date 2024-02-01
 */
public interface BusinessFieldSettingMapper
{
    /**
     * 查询业务字段信息
     *
     * @param id 业务字段信息主键
     * @return 业务字段信息
     */
    public BusinessFieldSetting selectBusinessFieldSettingById(Long id);

    /**
     * 查询业务字段信息列表
     *
     * @param businessFieldSetting 业务字段信息
     * @return 业务字段信息集合
     */
    public List<BusinessFieldSetting> selectBusinessFieldSettingList(BusinessFieldSetting businessFieldSetting);

    /**
     * 新增业务字段信息
     *
     * @param businessFieldSetting 业务字段信息
     * @return 结果
     */
    public int insertBusinessFieldSetting(BusinessFieldSetting businessFieldSetting);

    /**
     * 修改业务字段信息
     *
     * @param businessFieldSetting 业务字段信息
     * @return 结果
     */
    public int updateBusinessFieldSetting(BusinessFieldSetting businessFieldSetting);

    /**
     * 删除业务字段信息
     *
     * @param id 业务字段信息主键
     * @return 结果
     */
    public int deleteBusinessFieldSettingById(Long id);

    /**
     * 批量删除业务字段信息
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBusinessFieldSettingByIds(Long[] ids);

    void insertBatch(@Param("businessFieldSettings") List<BusinessFieldSetting> businessFieldSettings, @Param("businessId") Long businessId);

    void deleteBusinessFieldSettingByBusinessId(@Param("businessId") Long businessId);

    List<BusinessFieldSetting> getFieldInfo(@Param("businessId") Long businessId);

    void deleteBusinessFieldSettingByBusinessIds(Long[] businessIds);

    FieldSettingVo selectFieldById(@Param("sceneId") Long sceneId, @Param("sysObjId1") Long sysObjId1, @Param("sysObjId2") Long sysObjId2);

    List<String> selectFieldListById(@Param("sceneId") Long sceneId, @Param("sysObjId") Long sysObjId);

    List<String> selectPrimaryKeysById(@Param("sysObjId") Long sysObjId);

    List<String> selectBusinessFieldSettingBycolumnName(String columnName);

    List<BusinessFieldSetting> selectisForeignKeyById(Long sysObjId2);

    FieldSettingVo selectFieldByTableId(Long associationTable);

    List<String> selectBusinessFieldSettingBycolumnNameAndisForeignKey(String columnName);
}
